import javax.naming.Context;
import javax.naming.InitialContext;


public class Test {
public static void main(String args[]){
	try {
	Context ctx = new InitialContext();

	String myProp = "<not found>";
	System.out.println("myProp---,,-->"+myProp);
	      myProp = (String) ctx.lookup( "java:comp/env" );  // from Tomcat's server.xml
	      System.out.println("myProp----->"+myProp);
	} catch( Exception e ) 
	{ 
		e.printStackTrace();
		}
}}

